//维护当前实例
let currentInstance = null
export function setCurrentInstance(instance) {
  currentInstance = instance
}
export function onMounted(fn) {
  if(currentInstance) {
    currentInstance.mounted.push(fn)
  } else {
    console.error('onMounted 函数只能在setup 函数中调用')
  }
}